const path = require('path');

//获取到当前文件的所在目录
var can = __dirname;
var can1 = path.dirname(__filename);
var can2 = path.resolve(__filename,'..');
var can3 = path.normalize(__filename+'/..');
var can4 = path.parse(__filename.dir);

//获得当前文件的文件名
var name = path.parse(__filename).base;
var name1 = path.basename(__filename)
var name2 = path.parse(__filename).name + path.extname(__filename);
var name3 = path.join(path.parse(__filename).name + path.parse(_filename).ext);

if(path.sep == "\\"){
    var name4 = path.basename(__filename);
    console.log(name4);
}

//获取当前文件的扩展名
var type = path.parse(__filename).ext;
var type1 = path.extname(__filename);
